package com.atguigu.java.ai.langchain4j.assistant;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import reactor.core.publisher.Flux;
import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;

/**
 * @Author: LZY
 * @Date: 2025/09/02 09:06
 * @Description:
 **/
@AiService(
        wiringMode = EXPLICIT,
        //chatModel = "qwenChatModel",//千问模型
        streamingChatModel = "qwenStreamingChatModel",//千问模型 流式响应
        chatMemoryProvider = "chatMemoryProviderXiaozhi",
        tools = "appointmentTools",//tools配置
        //contentRetriever = "contentRetrieverXiaozhi" //配置默认向量存储
        contentRetriever = "contentRetrieverXiaozhiPincone" //自定义向量
)
public interface XiaozhiAgent {
    @SystemMessage(fromResource = "zhaozhi-prompt-template.txt")
    Flux<String> chat(@MemoryId Long memoryId, @UserMessage String userMessage);
}
